<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<#include "../include/top.html">
	
	<link rel="stylesheet" type="text/css" href="${realpath}/resources/webuploader/webuploader.css">
	<script type="text/javascript" src="${realpath}/resources/webuploader/webuploader.min.js"></script>
	<script type="text/javascript" src="${realpath}/resources/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="${realpath}/resources/ueditor/ueditor.all.js"></script>
	<script type="text/javascript" charset="utf-8" src="${realpath}/resources/ueditor/lang/zh-cn/zh-cn.js"></script>
	<script type="text/javascript" charset="utf-8" src="${realpath}/resources/ueditor/MyActionUrl.js"></script>
	<link rel="stylesheet" type="text/css" href="${realpath}/resources/webuploader/webuploader.css">
	<link rel="stylesheet" type="text/css" href="${realpath}/resources/css/publicTopic.css">
	<script language="javascript" type="text/javascript" src="${realpath}/resources/datePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="${realpath}/resources/webuploader/webuploader.min.js"></script>
	<script type="text/javascript" charset="utf-8" src="${realpath}/resources/js/bbs.js"></script>

	<title>发帖</title>
	</head>
	<style type="text/css">
	
</style>
<body>
	<#include "../include/header.html">
	<div class="main">
	<div class="container">
		<form id="postBbsForm">
		<input type="hidden" name="content" id="richContent" />
			<div class="row">
				<div class="form-group" id="topicTitle">
					<label class="col-xs-1 control-label"> <em class="important">*</em>
						标题:
					</label>
					<div class="col-xs-10">
						<input class="form-control"  name="title" id="title"></input>
					</div>
				</div>
			</div>

			<div class="row">
				<div class="form-group" id="category">
					<label class="col-xs-1 control-label"> <em class="important">*</em>
						板块:
					</label>
					<div class="col-xs-3">
						<select class="form-control" name="pCategoryId" id="pCategoryId">
							<option value="">请选择一级分类</option>
						</select>
					</div>
					<div class="col-xs-3">
						<select class="form-control" name="categoryId" id="categoryId">
							<option value="">请选择二级分类</option>
						</select>
					</div>
					<input id="categoryName" name="categoryName" type="hidden" />
			</div>
		</div>

		<div class="row">
			<div class="form-group">
				<label class="col-xs-1 control-label">
					<em class="important">*</em>
					类型:
				</label>
				<div class="col-xs-8">
					<#list topicType as item>
					<label class="checkbox-inline" style="padding-left: 0;">
						<input type="radio"<#if item_index==0>checked="checked"</#if>
					name="topicType"  value="${item.getType()}" class="topicType">${item.getDesc()}
					</label>
					</#list>
		</div>
	</div>
</div>

<div id="votePanel">
<div class="row">
			<div class="form-group">
				<label class="col-xs-1 control-label"></label>
				<div class="col-xs-8" id="voteChooseList">
					<div class="row">
						<div class="col-xs-9">
							<input name="voteContent" type="text" class="form-control answer" placeholder="输入选项内容">
						</div>
						<div class="col-xs-2" id="addVoteChoose"><a href="javascript:;">添加选项</a></div>
					</div>
					<div class="row">
						<div class="col-xs-9">
							<input name="voteContent" type="text" class="form-control answer" placeholder="输入选项内容"></div>
					</div>
					
				
				</div>
			</div>
		</div>
		
			<div class="row">
					<div class="form-group">
					<label class="col-xs-1 control-label">投票类型:</label>
						<div class="col-xs-4">
								<#list voteType as item>
										<label class="checkbox-inline" style="padding-left: 0;">
											<input type="radio"<#if item_index==0>checked="checked"</#if> name="voteType"  
							         value="${item.getType()}">${item.getDesc()}</label>
								</#list>
						</div>								
					</div>
					</div>
					<div class="row" id="enddate">
					<div class="form-group">
					<label class="col-xs-1 control-label">截止日期:</label>
						<div class="col-xs-2">
								<input  id="endDateString" name="endDateString" class="form-control" type="text" onClick="WdatePicker()"/>	
						</div>
						</div>				
					</div>
</div>
	
	<div class="row">
				<div class="form-group" id="ueContent">
					<label class="col-xs-1 control-label"> <em class="important">*</em>
						内容:
					</label>
					<div class="col-xs-10">
						<script id="editor" type="text/plain" style="width:950px;height:300px;"></script>
					</div>
				</div>
			</div>
			
			<input type="hidden" name="fileName" id="attached_file_name" />
			<input type="hidden" name="fileUrl" id="attached_file" />
			
			<div class="row">
				<div class="form-group">
					<label class="col-xs-1 control-label">&nbsp;&nbsp;&nbsp;
						附件:
					</label>
					<div class="col-xs-1" id="filePicker">
							<a class="btn btn-info">上传附件</a>
					</div>
					<div class="col-xs-4" id="fileuploadtip">
							<span class="info">大小不能超过2M,只能是.rar、.zip文件</span>
					</div>
					<div id="loading-upload" class="col-xs-1" style="display:none">
							<img src="${realpath}/resources/images/loading.gif">
					</div>
					<div class="col-xs-4" id="file-list">
							
					</div>
				</div>
			</div>
			
			<div class="row">
				<div class="form-group" id="needMark">
					<label class="col-xs-1 control-label">&nbsp;&nbsp;&nbsp;
						积分:
					</label>
					<div class="col-xs-1">
						<input class="form-control"  name="downloadMark" id="mark" value="0"></input>
					</div>
					<div class="col-xs-2">
					 <a href="${realpath}/faq">为什么需要积分</a>
					 </div>
				</div>
			</div>
</form>


		<div class="row">
			<div class="col-xs-10"></div>
			<button class="btn btn-info" id="postExamBtn">发布帖子</button>
		</div>
</div>
</div>
<script type="text/javascript" charset="utf-8" src="${realpath}/resources/js/publicTopic.js"></script>
<#include "../include/footer.html"></body>
</html>